Nominal Anti-Unification
نویسندگان
چکیده
Equation solving between nominal terms has been investigated by several authors, who designed and analyzed algorithms for nominal unification [3, 4, 15, 26], nominal matching [5], equivariant unification [6], permissive nominal unification [8]. However, in contrast to unification, its dual problem, anti-unification, has not been studied for nominal terms previously. In [18], it is referred to as “the as-of-yet undiscovered nominal anti-unification”, which “could form a fundamental component of a refactoring tool” for αProlog [7] programs. Software refactoring is one of possible applications of anti-unification. This method, formulated for different theories, has been successfully used in inductive logic programming [17], cognitive modeling [24], analogy making [13], inductive program synthesis [12], proof generalization [27], mathematical reasoning [10, 11], etc. Nominal anti-unification can play a role in extending some of these applications to the nominal setting. For instance, it can be useful to generalize proofs done in nominal logic, or in doing analogical reasoning in mathematics, or in adapting inductive program synthesis methods to αProlog programs, etc. The anti-unification problem for two terms t1 and t2 is concerned with finding a generalization term t such that t1 and t2 are substitutive instances of t. The interesting generalizations are the least general ones (lgg). Plotkin [20] and Reynolds [22] initiated research on anti-unification in the 1970s, developing algorithms for first-order terms. Since then, anti-unification has been studied in various theories, including some of those with binding constructs: calculus of constructions [19], Mλ [9], second-order lambda calculus with type variables [16], simply-typed lambda calculus where generalizations are higher-order patterns [2], just to name a few. In this paper we address the problem of computing lgg’s for nominal terms-in-context, which are pairs of a freshness context and a nominal term. It turned out that without a restriction, there is no lgg for terms-in-context, in general. Therefore we restrict the set of atoms which are permitted in generalizations to be finite. In this case, there exists a single lgg (modulo ') and we design an algorithm to compute it. Computation of nominal lgg’s requires a solution to the equivariance problem which aims at finding a permutation of atoms π for given terms t1 and t2 such that π applied to t1 is α-equivalent to t2 (under a given freshness context). Various anti-unification techniques, such as first-order, higher-order, or equational antiunification have been used in inductive logic programming, logical and relational learning [21], reasoning by analogy [13], program synthesis [23], program verification [16], etc. Nominal anti-unification can, hopefully, contribute in solving similar problems in nominal setting. The anti-unification algorithm has been implemented and is available from www.risc.jku. at/projects/stout/software/nau.php. The implementation of the equivariance algorithm is also accessible separately from www.risc.jku.at/projects/stout/software/nequiv.php.
منابع مشابه
A Library of Anti-unification Algorithms
Generalization problems arise in many branches of artificial intelligence: machine learning, analogical and case-based reasoning, cognitive modeling, knowledge discovery, etc. Anti-unification is a technique used often to solve generalization problems. In this paper we describe an open-source library of some newly developed anti-unification algorithms in various theories: for firstand second-or...
متن کاملSixth International Symposium on Symbolic Computation in Software Science
Generalization problems arise in many areas of software science: code clone detection, program reuse, partial evaluation, program synthesis, invariant generation, etc. Anti-unification is a technique used often to solve generalization problems. In this paper we describe an open-source library of some newly developed anti-unification algorithms in various theories: for firstand second-order unra...
متن کاملبرآورد شاخصهای حمایتی صنایع کاغذسازی کشور با تأکید بر اجرای سیاست یکسانسازی نرخ ارز
One of the ways to be informed on the extent of activities in various industries is to measure the rate of nominal protection. This paper tries to calculate the nominal and effective protection in order to examine the exchange rate unification impacts on the protection of pulp and paper industries with the aim of performing the exchange rate unification policy. Therefore, nominal protection rat...
متن کاملRelating Nominal and Higher-Order Pattern Unification
Higher-order pattern unification and nominal unification are two approaches to unifying modulo some form of α-equivalence (consistent renaming of bound names). Though the higher-order and nominal approaches superficially dissimilar, there is a natural concretion (or name-application) operation for nominal terms that can be used to simulate the behavior of higher-order patterns. We describe a fo...
متن کاملNominal C-Unification
Nominal unification is an extension of first-order unification that takes into account the α-equivalence relation generated by binding operators, following the nominal approach. We propose a sound and complete procedure for nominal unification with commutative operators, or nominal C-unification for short, which has been formalised in Coq. The procedure transforms nominal C-unification problems...
متن کامل